﻿Imports Lourdes.BackEnd.BC
Imports Lourdes.BackEnd.Modelo
'Imports Lourdes.BackEnd
Public Class ucPersonaImpuestos 
  Private _Alicuota As Double
  Public ReadOnly Property Alicuota() As Double
    Get
      Return _Alicuota
    End Get
  End Property

  Public Sub CargarCondicionIVACliente(ByVal pPerId As Integer?)
    Dim objBcPer As BC_Persona
    Dim lstCondIVA As List(Of Persona)
    Try
      objBcPer = New BC_Persona

      If Not pPerId.HasValue Then
        txtAlicuotaIvaVal.Text = "0"
        txtCondIvaDesc.Text = ""
      Else
        lstCondIVA = objBcPer.getCondicionIVAbyPersonaId(pPerId)
        If lstCondIVA.Count > 0 Then
          txtCondIvaDesc.Text = lstCondIVA(0).CondicionIVA.Descripcion
          txtAlicuotaIvaVal.Text = lstCondIVA(0).CondicionIVA.Alicuota
          _Alicuota = lstCondIVA(0).CondicionIVA.Alicuota
        End If
      End If

    Catch ex As Exception
      Throw ex
    End Try
  End Sub
End Class
